home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 15 / Amiga Plus Leser CD 15.iso / Tools / Development / AmigaTalk_X / intuition / WindowFlags.st < prev    next >
Encoding:
Text File  |  2002-03-13  |  3.0 KB  |  78 lines

  1. " -------------------------------------------------------------------- "
  2. " WindowFlags Class is a Singleton class that allows the user to       "
  3. " reference Window Flags without having to remember their actual       "
  4. " hexadecimal values.                                                  "
  5. ""
  6. " The User does NOT need to create one of these, since Intuition Class "
  7. " will instantiate the only needed instance of this Class.  See the    "
  8. " SetupIntuition.st source file for the method(s) that help the User   "
  9. " with this Class.                                                     "
  10. ""
  11. " ALL singleton classes MUST contain the following:                    "
  12. ""
  13. "   the methods:  isSingleton AND privateSetup     AND                 "
  14. "                 uniqueInstance Class instance variable.              "
  15. " -------------------------------------------------------------------- "
  16.  
  17. Class WindowFlags :Dictionary ! uniqueInstance !
  18. [
  19.    isSingleton
  20.      ^ true  
  21. |  
  22.    privateNew ! newinstance !
  23.      newinstance <- super new.
  24.  
  25.      ^ newinstance
  26. |
  27.    new
  28.      ^ (self privateSetup)
  29. |
  30.    privateSetup
  31.      (uniqueInstance isNil)
  32.        ifTrue: [uniqueInstance <- self privateNew.
  33.  
  34.                 self at: #WFLG_SIZEGADGET     put: 1.
  35.                 self at: #WFLG_DRAGBAR        put: 2.
  36.                 self at: #WFLG_DEPTHGADGET    put: 4.
  37.                 self at: #WFLG_CLOSEGADGET    put: 8.
  38.  
  39.                 self at: #WFLG_REFRESHBITS    put: 16rC0. "For masking"
  40.                 self at: #WFLG_SIZEBRIGHT     put: 16r10.
  41.                 self at: #WFLG_SIZEBBOTTOM    put: 16r20.
  42.  
  43.                 self at: #WFLG_SMART_REFRESH  put: 0.
  44.                 self at: #WFLG_SIMPLE_REFRESH put: 16r40.
  45.                 self at: #WFLG_SUPER_BITMAP   put: 16r80.
  46.                 self at: #WFLG_OTHER_REFRESH  put: 16rC0.
  47.  
  48.                 self at: #WFLG_BACKDROP       put: 16r100.
  49.                 self at: #WFLG_REPORTMOUSE    put: 16r200.
  50.                 self at: #WFLG_GIMMEZEROZERO  put: 16r400.
  51.                 self at: #WFLG_BORDERLESS     put: 16r800.
  52.  
  53.                 self at: #WFLG_ACTIVATE       put: 16r1000.
  54.  
  55.                 self at: #WFLG_RMBTRAP        put: 16r10000.
  56.                 self at: #WFLG_NOCAREREFRESH  put: 16r20000.
  57.                 self at: #WFLG_NW_EXTENDED    put: 16r40000.
  58.  
  59.                 self at: #WFLG_NEWLOOKMENUS   put: 16r200000.
  60.  
  61.                 self at: #WFLG_VISITOR        put: 16r8000000.
  62.                 self at: #WFLG_ZOOMED         put: 16r10000000.
  63.                 self at: #WFLG_HASZOOM        put: 16r20000000.
  64.  
  65.                "These flags are set only by Intuition.  
  66.                 YOU MAY NOT SET THEM YOURSELF!"
  67.  
  68.                 self at: #WFLG_WINDOWACTIVE   put: 16r2000.
  69.                 self at: #WFLG_INREQUEST      put: 16r4000.
  70.                 self at: #WFLG_MENUSTATE      put: 16r8000.
  71.                 self at: #WFLG_WINDOWREFRESH  put: 16r1000000.
  72.                 self at: #WFLG_WBENCHWINDOW   put: 16r2000000.
  73.                 self at: #WFLG_WINDOWTICKED   put: 16r4000000.
  74.                ].
  75.                
  76.      ^ self "uniqueInstance??"
  77. ]
  78.